home *** CD-ROM | disk | FTP | other *** search
/ Business Assistant / Business Assistant.iso / indus / rental / manage.prg < prev    next >
Text File  |  1986-05-31  |  13KB  |  347 lines

  1. **    Last revision: May 27, 1986 at 20:58
  2. * MANAGE.PRG
  3. *
  4. * This is a highly complicated program and your help in both clearing
  5. * up the bugs and making suggestions will be appreciated. My thanks to the
  6. * many people who helped test and revise this program - and especially to
  7. * Lee Hillard for some great code and for his pretty print and dBASE syntax
  8. * checker program. Lee is at Hilco Software, 304 N. 17th St., Mt. Vernon
  9. * WA 98273. (206) 428-0475. I might add that the coded portion of the program
  10. * was done using RECODE by Hilco. However, there is no way that we could
  11. * fully test this program without extensive field work.  Most of the changes
  12. * from this point on should be relatively simple - so if you are using the
  13. * program, please drop me a note.  We will try to let you know of changes
  14. * as they develop, either via a note or a new SIG/M release. If you find a
  15. * bug or a requirement for the program, please let us know.
  16. *
  17. * April 1986
  18. * After receiving many requests I finally did a conversion of this
  19. * program from dBASEII to dBASEIII.  This is the converted version. It
  20. * really has not been tested - so please drop me a card on any problems
  21. * you find.
  22. *
  23. * Please contact:
  24. *                   Stephen M. Leon
  25. *                   200 Winston Drive
  26. *                   Cliffside Park, NJ 07010
  27. *                   (201) 886-1658
  28. *                         or
  29. *                   Department of Law
  30. *                   2 World Trade Center
  31. *                   New York, NY 10047
  32. *                   (212) 488-7677
  33. *******************************************************************************
  34. *                                                                             *
  35. *                    N O T I C E                                              *
  36. *                                                                             *
  37. * Copyright 1984,86 by STEPHEN M.LEON.  Non-commercial use or distribution       *
  38. * of the program is authorized only if this notice is retained together with  *
  39. * the text relating to acceptance of the terms of this notice, and the person *
  40. * or persons using the program or benefiting therefrom assume all direct or   *
  41. * indirect risks of such use and agree to indemnify the author and the not-   *
  42. * for-profit computer clubs distributing this program, from any direct or     *
  43. * or indirect expenses incurred by them as a result of their use thereof.     *
  44. * Expenses shall include reasonable counsel fees including reasonable fees    *
  45. * of the author in his capacity as an attorney for services on a reasonable   *
  46. * billing time basis rendered to himself in his capacity as the holder of     *
  47. * the copyright.  Any use of this program constitutes an agreement to the     *
  48. * conditions of this license.  Any other use or distribution is unauthorized  *
  49. * and prohibited  without the express written consent of the author.          *
  50. *                                                                             *
  51. * This program is distributed free (for a nominal media charge) by SIG/M      *
  52. * Special Interest Group/Microcomputers, Box 97, Iselin, NJ 08830.            *
  53. * SIG/M is a not-for-profit undertaking of the Amateur Computer Group of New  *
  54. * Jersey and the New York Amateur Computer Club. This program is also made    *
  55. * available for PC users via PC/BLUE SOFTWARE, also a not-for profit under-   *
  56. * taking of the New Jersey and New York clubs. Permission is granted to any   *
  57. * other not-for-profit group to include this program in their library so long *
  58. * as this notice is retained and the conditions set forth herein are complied *
  59. * with.
  60. *******************************************************************************
  61. * initializing program of multiple database
  62. SET TALK OFF
  63. SET HEADING OFF
  64. SET SCOREBOARD OFF
  65. SET SAFETY OFF
  66. SET DELIMITER ON
  67. SET INTENSITY OFF
  68. SET DELIMITER TO '[]'
  69. PUBL more, first, dr, dconame, clipper, moveit, account, keepitup, frame, line, line1
  70. IF .NOT. clipper
  71.  SET FUNCTION 'F2' TO ' '
  72.  SET FUNCTION 'F3' TO ' '
  73.  SET FUNCTION 'F4' TO ' '
  74.  SET FUNCTION 'F5' TO ' '
  75.  SET FUNCTION 'F6' TO ' '
  76.  SET FUNCTION 'F7' TO ' '
  77.  SET FUNCTION 'F8' TO ' '
  78.  SET FUNCTION 'F9' TO ' '
  79.  SET FUNCTION 'F10' TO ' '
  80.  SET DOHISTORY ON
  81.  SET HELP OFF
  82.  ON ERROR SUSPEND
  83.  ON ESCAPE suspend
  84. ENDI
  85. SET PROCEDURE TO PROC
  86. line = REPLICATE(CHR(205),80)
  87. line1 = REPLICATE(CHR(205),78)
  88. frame = CHR(201)+CHR(205)+CHR(187)+CHR(186)+CHR(188)+;
  89. CHR(205)+CHR(200)+CHR(186)
  90. * must have correct date information
  91. DO WHIL SUBSTR(DTOC(DATE()),7,2) = '80'
  92.  CLEA
  93.  ! DATE
  94.  ! TIME
  95. ENDD
  96. IF .NOT. file ("MANAGE.DAT")
  97.  DO INIT
  98. ENDI .NOT. file
  99. REST from manage.dat additive
  100. IF clipper
  101.  IF .NOT. file ("CODE.NTX")
  102.   CLEA
  103.   @ 10,10 SAY 'I must create index files for Clipper.'
  104.   @ 11,10 SAY 'Please be patient for a few moments'
  105.   @ 12,00 SAY '   '
  106.   SELE A
  107.   USE &dr.:build
  108.   INDE ON bcode TO &dr.:code
  109.   SELE B
  110.   USE &dr.:tenant
  111.   INDE on bcode to &dr.:codea
  112.   SELE C
  113.   USE &dr.:account
  114.   INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
  115.   SELE D
  116.   USE &dr.:CHART
  117.   INDE on acctno TO &dr.:chart
  118.  ENDI
  119. ELSE
  120.  IF .NOT. file ("CODE.NDX")
  121.   CLEA
  122.   @ 10,10 SAY 'I must create index files for dBase.'
  123.   @ 11,10 SAY 'I will keep you posted'
  124.   @ 12,00 SAY '   '
  125.   SET ECHO ON
  126.   SET TALK ON
  127.   SELE A
  128.   USE &dr.:build
  129.   INDE ON bcode TO &dr.:code
  130.   SELE B
  131.   USE &dr.:tenant
  132.   INDE on bcode to &dr.:codea
  133.   SELE C
  134.   USE &dr.:account
  135.   INDE ON SUBSTR(data,7,4) +date + SUBSTR(data,5,2) TO &dr.:account
  136.   SELE D
  137.   USE &dr.:CHART
  138.   INDE on acctno TO &dr.:chart
  139.   SET TALK OFF
  140.   SET ECHO OFF
  141.  ENDI
  142. ENDI clipper
  143. SET PROC TO proc
  144. CLEA
  145. IF clipper
  146.  @ 1,0, 16, 79 BOX frame
  147.  @ 3,3, 14, 74 BOX frame
  148. ELSE
  149.  @ 01,0 TO 16,79 double
  150.  @ 03,3 TO 14,74 double
  151. ENDI clipper
  152. @ 05,19 SAY 'AMATEUR COMPUTER GROUP OF NEW JERSEY'
  153. @ 7,18 SAY 'SIG/M  P R O P E R T Y  M A N A G E R'
  154. @ 9,20 SAY 'A dBASEIII DATA MANAGEMENT PROGRAM'
  155. @ 10,25 SAY 'FOR TENANTED REAL ESTATE'
  156. @ 11,35 SAY 'by Stephen M. Leon'
  157. @ 13,40 SAY 'Vers 2.0  June 1986 (C) 1984,5,6'
  158. STOR 'Y' TO goahead
  159. @ 18,07 SAY "ARE YOU AGREEABLE TO THE TERMS OF THE COPYRIGHT LICENSING AGREEMENT"
  160. @ 19,07 SAY "AS SET FORTH IN THE FILE 'MANAGE.PRG' ? "
  161. @ 19,65 GET goahead PICTURE '!'
  162. READ
  163. DO WHIL AT(goahead, 'YN') = 0
  164.  @ 19,65 GET goahead PICTURE '!'
  165.  READ
  166. ENDD WHILE goahead
  167. IF goahead = 'N'
  168.  QUIT
  169. ENDI
  170. * set up initial database file
  171. SELE A
  172. USE &dr.:build
  173. SET INDEX TO &dr.:code
  174. * set up forever loop for program
  175. DO WHIL .t.
  176.  STOR '?' TO comman
  177.  CLEA
  178.  IF clipper
  179.   @ 0,0, 22, 79 BOX frame
  180.   @ 4,1 SAY line1
  181.   @ 19,1 SAY line1
  182.  ELSE
  183.   @ 0,0 TO 4,79
  184.   @ 0,0 TO 19,79
  185.   @ 0,0 TO 22,79 DOUBLE
  186.  ENDI
  187.  @ 20,5 SAY 'Please select one of the above options. You may also leave this menu'
  188.  @ 21,5 SAY "by typing 'Q' and get on-line HELP by typing '?'."
  189.  @ 2,06 SAY DCONAME + '  -  MAIN MENU'
  190.  @ 2,65 SAY DTOC(date())
  191.  @ 7,26 SAY "A.  Accounting Database"
  192.  @ 8,26 SAY "B.  Building Database"
  193.  @ 9,26 SAY "C.  Tenant Database"
  194.  @ 10,26 SAY "D.  Database Maintenance"
  195.  @ 11,26 SAY "E.  Help"
  196.  @ 12,26 SAY "F.  Reports"
  197.  @ 13,26 SAY "G.  Quit to dBASE"
  198.  @ 14,26 SAY "H.  Exit to operating system"
  199.  @ 17,23 SAY "PLEASE SELECT ONE OF THE OPTIONS"
  200.  @ 17,58 GET comman PICTURE '!'
  201.  READ
  202.  DO WHIL AT(COMMAN, 'ABCDEFGH?Q') = 0
  203.   STOR '?' TO comman
  204.   @ 17,58 GET comman PICTURE '!'
  205.   READ
  206.  ENDD
  207.  DO CASE
  208.  CASE COMMAN = 'A'
  209.   SELE C
  210.   USE &dr.:account
  211.   DO account
  212.  CASE COMMAN = 'B'
  213.   SELE A
  214.   USE &dr.:build INDEX &dr.:code
  215.   DO build
  216.  CASE COMMAN = 'C'
  217.   SELE B
  218.   USE &dr.:tenant INDEX &dr.:codea
  219.   DO tenant
  220.  CASE COMMAN = 'D'
  221.   DO maintain
  222.  CASE COMMAN = 'F'
  223.   DO report
  224.  CASE COMMAN = 'E' .OR. COMMAN = '?'
  225.   CLEA
  226.   TEXT
  227.  
  228.                M A I N   M E N U   H E L P   F I L E
  229.  
  230. We have tried to make this program as  simple and as straight forward as is
  231. possible. There is no separate documentation - but at any point in the pro-
  232. gram where a '?' prompt appears we have built in a help menu to explain the
  233. various options.  You also may want to print out the opening program module
  234. (a